Tables [dbo].[PotentialMatchingGift]
Properties
PropertyValue
Created10:31:33 AM Tuesday, March 02, 2010
Last Modified1:20:16 PM Thursday, February 23, 2012
Columns
NameData TypeMax Length (Bytes)Allow NullsDefault
Cluster Primary Key PK_PotentialMatchingGift: PotentialMatchingGiftKeyPotentialMatchingGiftKeyuniqueidentifier16
No
Indexes IX_PotentialMatchingGift_DonationPartKey: OrderLineKeyOrderLineKeyuniqueidentifier16
No
Foreign Keys FK_PotentialMatchingGift_MatchingGiftPlan: [dbo].[MatchingGiftPlan].MatchingGiftPlanKeyIndexes IX_PotentialMatchingGift_MatchingGiftPlanKey: MatchingGiftPlanKeyMatchingGiftPlanKeyuniqueidentifier16
Yes
Foreign Keys FK_PotentialMatchingGift_Relationship_MatchingGift: [dbo].[RelationshipMain].MatchingGiftRelationshipKeyMatchingGiftRelationshipKeyuniqueidentifier16
Yes
MatchingGiftInformationnvarchar(200)400
Yes
DateCreateddatetime8
No
DateMatchingGiftFormReceiveddatetime8
Yes
DateMatchingFormSubmitteddatetime8
Yes
Amountdecimal(18,4)9
No
((0))
Foreign Keys FK_PotentialMatchingGift_UserMain_UpdatedBy: [dbo].[UserMain].UpdatedByUserKeyIndexes IX_PotentialMatchingGift_UpdatedByUserKey: UpdatedByUserKeyUpdatedByUserKeyuniqueidentifier16
No
UpdatedOndatetime8
No
Foreign Keys FK_PotentialMatchingGift_UserMain_CreatedBy: [dbo].[UserMain].CreatedByUserKeyIndexes IX_PotentialMatchingGift_CreatedByUserKey: CreatedByUserKeyCreatedByUserKeyuniqueidentifier16
No
CreatedOndatetime8
No
Foreign Keys FK_PotentialMatchingGift_SystemEntity: [dbo].[SystemEntity].SystemEntityKeyIndexes IX_PotentialMatchingGift_SystemEntityKey: SystemEntityKeySystemEntityKeyuniqueidentifier16
No
MarkedForDeleteOndatetime8
Yes
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_PotentialMatchingGift: PotentialMatchingGiftKeyPK_PotentialMatchingGiftPotentialMatchingGiftKey
Yes
IX_PotentialMatchingGift_CreatedByUserKeyCreatedByUserKey
IX_PotentialMatchingGift_DonationPartKeyOrderLineKey
IX_PotentialMatchingGift_MatchingGiftPlanKeyMatchingGiftPlanKey
IX_PotentialMatchingGift_SystemEntityKeySystemEntityKey
IX_PotentialMatchingGift_UpdatedByUserKeyUpdatedByUserKey
Foreign Keys Foreign Keys
NameColumns
FK_PotentialMatchingGift_MatchingGiftPlanMatchingGiftPlanKey->[dbo].[MatchingGiftPlan].[MatchingGiftPlanKey]
FK_PotentialMatchingGift_Relationship_MatchingGiftMatchingGiftRelationshipKey->[dbo].[RelationshipMain].[RelationshipKey]
FK_PotentialMatchingGift_SystemEntitySystemEntityKey->[dbo].[SystemEntity].[SystemEntityKey]
FK_PotentialMatchingGift_UserMain_CreatedByCreatedByUserKey->[dbo].[UserMain].[UserKey]
FK_PotentialMatchingGift_UserMain_UpdatedByUpdatedByUserKey->[dbo].[UserMain].[UserKey]
SQL Script
CREATE TABLE [dbo].[PotentialMatchingGift]
(
[PotentialMatchingGiftKey] [uniqueidentifier] NOT NULL,
[OrderLineKey] [uniqueidentifier] NOT NULL,
[MatchingGiftPlanKey] [uniqueidentifier] NULL,
[MatchingGiftRelationshipKey] [uniqueidentifier] NULL,
[MatchingGiftInformation] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DateCreated] [datetime] NOT NULL,
[DateMatchingGiftFormReceived] [datetime] NULL,
[DateMatchingFormSubmitted] [datetime] NULL,
[Amount] [decimal] (18, 4) NOT NULL CONSTRAINT [DF_PotentialMatchingGift_Amount] DEFAULT ((0)),
[UpdatedByUserKey] [uniqueidentifier] NOT NULL,
[UpdatedOn] [datetime] NOT NULL,
[CreatedByUserKey] [uniqueidentifier] NOT NULL,
[CreatedOn] [datetime] NOT NULL,
[SystemEntityKey] [uniqueidentifier] NOT NULL,
[MarkedForDeleteOn] [datetime] NULL
) ON [PRIMARY]

GO
ALTER TABLE [dbo].[PotentialMatchingGift] ADD CONSTRAINT [PK_PotentialMatchingGift] PRIMARY KEY CLUSTERED ([PotentialMatchingGiftKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_PotentialMatchingGift_CreatedByUserKey] ON [dbo].[PotentialMatchingGift] ([CreatedByUserKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_PotentialMatchingGift_MatchingGiftPlanKey] ON [dbo].[PotentialMatchingGift] ([MatchingGiftPlanKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_PotentialMatchingGift_DonationPartKey] ON [dbo].[PotentialMatchingGift] ([OrderLineKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_PotentialMatchingGift_SystemEntityKey] ON [dbo].[PotentialMatchingGift] ([SystemEntityKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_PotentialMatchingGift_UpdatedByUserKey] ON [dbo].[PotentialMatchingGift] ([UpdatedByUserKey]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PotentialMatchingGift] ADD CONSTRAINT [FK_PotentialMatchingGift_MatchingGiftPlan] FOREIGN KEY ([MatchingGiftPlanKey]) REFERENCES [dbo].[MatchingGiftPlan] ([MatchingGiftPlanKey])
GO
ALTER TABLE [dbo].[PotentialMatchingGift] ADD CONSTRAINT [FK_PotentialMatchingGift_Relationship_MatchingGift] FOREIGN KEY ([MatchingGiftRelationshipKey]) REFERENCES [dbo].[RelationshipMain] ([RelationshipKey])
GO
ALTER TABLE [dbo].[PotentialMatchingGift] ADD CONSTRAINT [FK_PotentialMatchingGift_SystemEntity] FOREIGN KEY ([SystemEntityKey]) REFERENCES [dbo].[SystemEntity] ([SystemEntityKey])
GO
ALTER TABLE [dbo].[PotentialMatchingGift] ADD CONSTRAINT [FK_PotentialMatchingGift_UserMain_CreatedBy] FOREIGN KEY ([CreatedByUserKey]) REFERENCES [dbo].[UserMain] ([UserKey])
GO
ALTER TABLE [dbo].[PotentialMatchingGift] ADD CONSTRAINT [FK_PotentialMatchingGift_UserMain_UpdatedBy] FOREIGN KEY ([UpdatedByUserKey]) REFERENCES [dbo].[UserMain] ([UserKey])
GO
Uses